package com.jcl.recruit.mapper;

/**
 * @ClassName SqlMapper
 * @Description TODO
 * @Author yyliu
 * @Date 2018/11/17 10:17
 * @Version 1.0
 **/
public interface SqlMapper {

    String QUERY_SCRIPT_START = "<script>";
    String QUERY_SCRIPT_END = "</script>";

    String QUERY_WHERE_START = "<where>";
    String QUERY_WHERE_END = "</where>";

    String FOREACH_START_LIST_ENTITY = "<foreach collection='list' item='entity' separator=','>";
    String FOREACH_START_LIST_ENTITY_NO_OPEN = "<foreach collection='list' item='entity' separator=','>";
    String FOREACH_START_LIST_IDS = "<foreach collection='ids' item='id' separator=',' open='(' close=')' >";
    String FOREACH_START_LIST_RESUME_IDS = "<foreach collection='resumeIds' item='resumeId' separator=',' open='(' close=')' >";
    String FOREACH_START_LIST_USER_IDS = "<foreach collection='userIds' item='userId' separator=',' open='(' close=')' >";
    String FOREACH_END = "</foreach>";

    String IF_START_LIST = "<if test='null!=list'>";
    String IF_START_ID = "<if test='null!=id'>";
    String IF_START_RESUME_ID = "<if test='null!=resumeId'>";
    String IF_START_USER_ID = "<if test='null!=userId'>";
    String IF_START_USER_IDS = "<if test='null!=userIds'>";
    String IF_END = "</if>";

    String SQL_INSERT_VALUE = " value ";
    String SQL_INSERT_VALUES = " values ";
    String SQL_IN = " in ";
    String SQL_AND = " and ";
    String SQL_OR = " or ";
    String SQL_EQUAL = " = ";

    String SQL_PROPERTY_ID = " id";
    String SQL_PROPERTY_ID_VALUE = " #{id} ";
    String SQL_PROPERTY_ID_ENTITY_VALUE = " #{entity.id} ";

    String SQL_PROPERTY_RESUME_ID = " resume_id ";
    String SQL_PROPERTY_RESUME_ID_VALUE = " #{resumeId} ";
    String SQL_PROPERTY_RESUME_ID_ENTITY_VALUE = " #{entity.resumeId} ";

    String SQL_CORP_CODE = " corp_code = #{corpCode}";
    String SQL_PROPERTY_CORP_CODE = " corp_code ";
    String SQL_PROPERTY_RESUME_CORP_CODE_VALUE = " #{corpCode} ";
    String SQL_PROPERTY_RESUME_CORP_CODE_ENTITY_VALUE = " #{entity.corpCode} ";

    String SQL_PROPERTY_USER_ID = " user_id ";
    String SQL_PROPERTY_USER_ID_VALUE = " #{userId} ";


}
